<?php
namespace Admin\Controller;
use Think\Controller;
class UserController extends PublicController{
	 public function index(){
		 $this->display();
	 }

	 //获取用户信息
	 public function get_all_user_list(){
	 	 $limit = I('get.limit');
		 $page = I('get.page');
		 $like=I('get.like');
		 if(!empty($like)){
			$where["id|openid|nickname"] = array("like","%".$like."%");
		  }
	 	$ret['total']=M('user')->count();
	 	$ret['data']=M('user')->where($where)->page($page,$limit)->select();
	 	foreach ($ret['data'] as $key => $value) {
	 		$ret['data'][$key]['logo_time']=date("Y-m-d H:i:s",$ret['data'][$key]['logo_time']);
	 		$ret['data'][$key]['last_time']=date("Y-m-d H:i:s",$ret['data'][$key]['last_time']);

	 	}
	 	$ret['code'] = 200; 
		ret($ret);
	 }

}
